package com.zyx.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Orders {
    private Integer orderId;

    private String userName;

    private String phone;

    private Integer spencerId;

    private Integer carId;

    private Integer autoId;

    private Integer state;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private Date createTime;

    private Auto auto;

    private Spencer spencer;

    @Override
    public String toString() {
        return "Orders{" +
                "orderId=" + orderId +
                ", userName='" + userName + '\'' +
                ", phone='" + phone + '\'' +
                ", spencerId=" + spencerId +
                ", carId=" + carId +
                ", autoId=" + autoId +
                ", state=" + state +
                ", createTime=" + createTime +
                ", auto=" + auto +
                ", spencer=" + spencer +
                '}';
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public Integer getSpencerId() {
        return spencerId;
    }

    public void setSpencerId(Integer spencerId) {
        this.spencerId = spencerId;
    }

    public Integer getCarId() {
        return carId;
    }

    public void setCarId(Integer carId) {
        this.carId = carId;
    }

    public Integer getAutoId() {
        return autoId;
    }

    public void setAutoId(Integer autoId) {
        this.autoId = autoId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Auto getAuto() {
        return auto;
    }

    public void setAuto(Auto auto) {
        this.auto = auto;
    }

    public Spencer getSpencer() {
        return spencer;
    }

    public void setSpencer(Spencer spencer) {
        this.spencer = spencer;
    }
}